<%@ page import="ar.org.sstuyv.Solicitud"%>
<!DOCTYPE html>
<html>
<head>
<meta name="layout" content="main">
<g:set var="entityName"
	value="${message(code: 'solicitud.label', default: 'solicitud')}" />
<title><g:message code="default.create.label"
		args="[entityName]" /></title>
<jq:resources />
<jqui:resources /> 
<jqgrid:resources />

<g:javascript library="jquery" />
<g:javascript library="jquery-ui" />
	<g:javascript> 
			 $(document).ready(function()
        {
         <jqgrid:grid
                                id="contact"
                                url="'${createLink(action: 'listJSON')}'"
                                editurl="'${createLink(action: 'editJSON')}'"
                                colNames="'First Name', 'Last Name', 'E-mail', 'Phone', 'id'"
                                colModel="{name:'firstName', editable: true},
                                                {name:'lastName', editable: true},
                                                {name:'email', editable: true},
                                                {name:'phone', editable: true},
                                                {name:'id', hidden: true}"
                                sortname="'lastName'"
                                caption="'Contact List'"
                                height="300"
                                autowidth="true"
                                scrollOffset="0"
                                viewrecords="true"
                                showPager="true"
                                datatype="'json'">
                                <jqgrid:filterToolbar id="contact" searchOnEnter="false" />
                                <jqgrid:navigation id="contact" add="true" edit="true" 
                                      del="true" search="true" refresh="true" />
                                <jqgrid:resize id="contact" resizeOffset="-2" />
                         </jqgrid:grid>
          $("#fecha").datepicker({dateFormat: 'yy/mm/dd'});
        })
		
		</g:javascript>

</head>
<body>
<jqgrid:wrapper id="contact" />
	<a href="#create-solicitud" class="skip" tabindex="-1"><g:message
			code="default.link.skip.label" default="Skip to content&hellip;" /></a>
	<div class="nav" role="navigation">
		<ul>
			<li><a class="home" href="${createLink(uri: '/')}"><g:message
						code="default.home.label" /></a></li>
			<li><g:link class="list" action="list">
					<g:message code="default.list.label" args="[entityName]" />
				</g:link></li>
		</ul>
	</div>
	<div id="create-solicitud" class="content scaffold-create" role="main">
		<h1>
			<g:message code="default.create.label" args="[entityName]" />
		</h1>
		<g:if test="${flash.message}">
			<div class="message" role="status">
				${flash.message}
			</div>
		</g:if>
		<g:hasErrors bean="${solicitudInstance}">
			<ul class="errors" role="alert">
				<g:eachError bean="${solicitudInstance}" var="error">
					<li
						<g:if test="${error in org.springframework.validation.FieldError}">data-field-id="${error.field}"</g:if>><g:message
							error="${error}" /></li>
				</g:eachError>
			</ul>
		</g:hasErrors>
		<g:form action="save">
			<fieldset class="form">
				<g:render template="generacionDelPlano/solicitud" />
			</fieldset>
			<fieldset class="buttons">
				<g:submitButton name="create" class="save"
					value="${message(code: 'default.button.create.label', default: 'Create')}" />
			</fieldset>
		</g:form>
	</div>
</body>
</html>
